package com.four.controller;

import com.four.service.AdminService;
import com.four.utils.JsonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @ClassName AdminCon
 * @Description 管理员con层
 * @Author Lilyan
 * @Date 2022/11/11 10:44
 * @Vsersion V1.0
 * @Projrct Name hotel_sys
 **/
@Controller
public class AdminCon {
    @Autowired
    private AdminService adminService;

    @RequestMapping("/admin")
    @ResponseBody
    public JsonResult admin() {
        JsonResult jsonResult = JsonResult.ok();
        jsonResult.setData(adminService.queryAll());
        return jsonResult;
    }
}
